Water Index · Automated Extraction (Shadow)

AWEI_sh – Automated Water Extraction Index (Shadow)

AWEI_sh (Feyisa et al., 2014) is an automated water extraction index designed to separate water from dark surfaces and shadows using a weighted combination of Green, NIR, SWIR1, and SWIR2 bands.

1. Scientific Definition

The Automated Water Extraction Index – Shadow (AWEI_sh) is specifically developed to handle water detection in areas with strong shadows, such as mountains, urban high-rise zones, or deep valleys, where simple NDWI may fail.

Formula (Feyisa et al., 2014)

AWEI_sh = 4 × (Green − SWIR1) − (0.25 × NIR + 2.75 × SWIR2)

  • Green – Green reflectance band
  • NIR – Near InfraRed band
  • SWIR1 – Short-Wave InfraRed 1
  • SWIR2 – Short-Wave InfraRed 2

Interpretation (Typical)

AWEI_shInterpretation
< 0Non-water: soil, urban, vegetation, shadows
> 0Water pixels (high confidence)

In practice, many studies use a threshold near AWEI_sh ≥ 0 to classify water.

Main Applications

  • Water detection in shadowed mountainous terrain
  • Urban water extraction (canals, rivers, reservoirs)
  • Flood mapping in complex topography
  • Complementary to NDWI / MNDWI in difficult conditions

2. Data & Bands

Sentinel-2 (Recommended Mapping)

  • Green: B3 (~560 nm)
  • NIR: B8 (~842 nm)
  • SWIR1: B11 (~1610 nm)
  • SWIR2: B12 (~2190 nm)

Landsat 8 / 9 (Equivalent)

  • Green: B3
  • NIR: B5
  • SWIR1: B6
  • SWIR2: B7

Best Practices

  • Use surface reflectance products (SR) not TOA when possible.
  • Mask clouds & cloud shadows with QA bands.
  • Apply a threshold (e.g. AWEI_sh > 0) for binary water/non-water classification.
  • Combine with NDWI/MNDWI for robust multi-index decision rules if needed.

Suggested Visualization Palette

For continuous AWEI_sh visualization: [ "#2b2d42", "#264766", "#2c7da0", "#00b4d8", "#90e0ef", "#caf0f8" ]

3. Google Earth Engine Code – AWEI_sh (Sentinel-2)

// AWEI_sh (Automated Water Extraction Index - Shadow) using Sentinel-2 SR
// Feyisa et al. (2014)
// AWEI_sh = 4*(Green - SWIR1) - (0.25*NIR + 2.75*SWIR2)

var roi = geometry;  // Draw AOI as geometry
Map.centerObject(roi, 11);

// 1. Load Sentinel-2 SR
var s2 = ee.ImageCollection("COPERNICUS/S2_SR")
  .filterBounds(roi)
  .filterDate("2023-01-01", "2023-12-31")
  .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 20))
  .select(["B3","B8","B11","B12"]); // Green, NIR, SWIR1, SWIR2

// 2. Median composite
var img = s2.median().clip(roi);

// 3. Compute AWEI_sh
var awei_sh = img.expression(
  "4.0 * (G - S1) - (0.25 * N + 2.75 * S2)",
  {
    "G":  img.select("B3"),   // Green
    "N":  img.select("B8"),   // NIR
    "S1": img.select("B11"),  // SWIR1
    "S2": img.select("B12")   // SWIR2
  }
).rename("AWEI_sh");

// 4. Visualization
// Note: AWEI_sh is not normalized; typical threshold ~ 0 for water
var vis = {
  min: -2000,
  max: 2000,
  palette: [
    "#2b2d42",
    "#264766",
    "#2c7da0",
    "#00b4d8",
    "#90e0ef",
    "#caf0f8"
  ]
};

Map.addLayer(awei_sh, vis, "AWEI_sh (Sentinel-2)");

// Optional: create a binary water mask (AWEI_sh > 0)
var waterMask = awei_sh.gt(0).selfMask();
Map.addLayer(waterMask, {palette:["#00b4d8"]}, "Water Mask (AWEI_sh > 0)", false);

// 5. Export AWEI_sh as GeoTIFF
Export.image.toDrive({
  image: awei_sh,
  description: "AWEI_sh_Export",
  fileNamePrefix: "AWEI_sh_S2",
  region: roi,
  scale: 20,          // SWIR1/2 are 20 m
  crs: "EPSG:4326",
  maxPixels: 1e13
});